import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'
import xView from "@/views/xView.vue";
import axiosView from "@/views/axiosView.vue";
import lifeView from "@/views/lifeView.vue";
import animationView from "@/views/animationView.vue";
import homePageView from "@/views/homePageView.vue";
import antView from "@/views/antView.vue";

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView
  },
  {
    path: '/about',
    name: 'about',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  },
  {
    path: '/xView',
    name: 'xView',
    component: xView,
  },
  {
    path: '/axios',
    name: 'home',
    component: axiosView
  },
  {
    path: '/life',
    name: 'home',
    component: lifeView
  },
  {
    path: '/animation',
    name: 'home',
    component: animationView
  },
  {
    path: '/home',
    name: 'home',
    component: homePageView
  },
  {
    path: '/ant',
    name: 'home',
    component: antView
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
